const jwt = require('koa-jwt')
const { PRIVATE_KEY } = require('../utils/constant')

module.exports = jwt({
  secret: PRIVATE_KEY,
  credentialsRequired: true
}).unless({   //验证白名单
  path: [
    '/',
    '/login',
    '/register',
    /^\/section/,
    '/backstage',
    '/getImgPath',
    '/RelationshipGraph',
    '/getRelationData'
  ]
})
